<?php

namespace App\Services;

use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\DB;
use common\utils\RedisKeys;

class HallConfigService
{

    public static function getFieldValue($field)
    {
        $hc = DB::table('hall_config')->select($field)->first();
        if (!$hc) {
            return false;
        }
        return $hc->$field;
    }

    // 获取jwt_token
    public static function getJwtToken()
    {
        $token = self::getFieldValue('jwt_token');
        return $token ?: env('JWT_SECRET');
    }

    // 获取sms_config
    public static function getSMSConfig()
    {
        return self::getFieldValue('sms_config');
    }
}
